package com.atde._05_behavioral_design_patterns.iterator;


import java.util.ArrayList;
import java.util.Iterator;

/**
 * @BelongsProject: hsp_java_design_mode
 * @BelongsPackage: com.atde._05_behavioral_design_patterns.iterator
 * @Author: Del
 * @CreateTime: 2025-06-29  18:40
 * @Description: 迭代器模式 -- 客户端
 * @Version: 1.0
 */
public class Client {
    public static void main(String[] args) {
        // 创建学院
        ArrayList<Colleage> colleages = new ArrayList<>();

        // 创建计算机学院
        ComputerCollege computerCollege = new ComputerCollege();

        // 创建信息工程学院
        InfoCollege infoCollege = new InfoCollege();

        colleages.add(computerCollege);
        colleages.add(infoCollege);

        OutPutImpl outPut = new OutPutImpl(colleages);
        outPut.printColleage();


    }
}
